Fix functional bugs in utilities and scrobbler#703
Conversation
- Fix findEpisodeMatchInList bug in utilities.py where 'list' was used instead of 'list_data'. - Fix Python 3 compatibility issue in scrobbler.py by replacing 'e.message' with 'str(e)'. - Improve defensive programming in scrobbler.py to handle missing keys in API results. - Add regression test for findEpisodeMatchInList. Co-authored-by: razzeee <5943908+razzeee@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This change fixes several functional bugs and improves code robustness:
resources/lib/utilities.py, thefindEpisodeMatchInListfunction was incorrectly passing the built-inlisttype instead of thelist_dataparameter to a helper function.resources/lib/scrobbler.py, a reference toe.message(removed in Python 3) was replaced withstr(e).resources/lib/scrobbler.py, the__preFetchUserRatingsmethod now checks for the existence of expected keys in the API response before accessing them.tests/test_utilities.pyto verify the fix and prevent regression of thefindEpisodeMatchInListbug.PR created automatically by Jules for task 12676173689244080702 started by @razzeee